<template>
  <div style="display: inline-block">
    <div class="phonebox" @click="showPhone">
      <div class="imgbox">
        <img :src="phoneItem.image" alt="" />
      </div>
      <div class="pricebox">
        {{ "￥" + phoneItem.price }}
      </div>
      <div class="directionbox">
        {{ phoneItem.description }}
      </div>
      <div class="sellbox">
        {{ phoneItem.comment }}
      </div>
      <div class="tag">
        <el-tag small type="danger">自营</el-tag>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ["phoneItem"],
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    showPhone() {
      this.$router.push({
        name: "phoneInfo",
        params: { id: this.phoneItem.id },
      });
    },
  },
};
</script>
<style  lang='less' scoped >
.phonebox {
  cursor: pointer;
  display: flex;
  padding: 10px 0;
  width: 320px;
  height: 400px;
  box-sizing: border-box;
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: 10px;
  align-items: center;
  flex-direction: column;
}
.phonebox:hover {
  box-shadow: 0 0 3px #ccc;
}

.imgbox:hover {
  box-shadow: none;
}
img {
  width: 220px;
  height: 220px;
}
.pricebox {
  width: 220px;
  text-align: left;
  color: red;
  font-size: 22px;
  font-weight: 500;
}
.directionbox {
  width: 220px;
  font-size: 10px;
  text-align: left;
  margin-bottom: 10px;
  color: #2c3e50;
}
.sellbox {
  width: 220px;
  text-align: left;
  color: #646fb0;
}
.tag {
  width: 220px;
  text-align: left !important;
}
</style>